package org.jeecg.modules.compilation.service;

import org.jeecg.modules.compilation.dto.CiDocDTO;
import org.jeecg.modules.compilation.dto.CiDocEditOrUpdateDTO;
import org.jeecg.modules.compilation.dto.SearchFileDTO;
import org.jeecg.modules.compilation.dto.SearchcIDocDraftDTO;
import org.jeecg.modules.compilation.entity.CiDoc;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.List;

/**
 * @Description: ci_doc
 * @Author: jeecg-boot
 * @Date:   2024-03-15
 * @Version: V1.0
 */
public interface ICiDocService extends IService<CiDoc> {

    List<CiDocDTO> list(String documentTypeSn);
    CiDocDTO getDoc(String documentTypeSn);



    /*
     * 全文检索
     * */
    List<CiDoc> search(SearchFileDTO searchFileDTO) throws IOException;

    /*
     * rabbit监听的删除方法
     * */
    void deleteById(Long id);


    /*
     * rabbit监听的添加方法
     * */
    void insertById(Long id) throws IOException;

    void deleteBatch(List<String> list);

    List<SearchcIDocDraftDTO> searchList(String documentTitle) throws IOException;

    String previewProcessingInterface(MultipartFile preView) throws Exception;
    Boolean save(CiDocEditOrUpdateDTO dto, MultipartFile  docFile, MultipartFile [] annexFile) throws Exception;

    //返回nginx的文件预览  --文件夹ci
    String previewCi(String documentSn) throws Exception;

    Boolean edit(CiDocEditOrUpdateDTO dto , MultipartFile file ,MultipartFile []  annexFiles) throws Exception;

    Boolean removeBySn(String documentSn);
}
